<% content_for :thredded_page_title, t('thredded.nav.moderation') %>
<% content_for :thredded_page_id, 'thredded--pending-moderation' %>
<%= render 'nav' %>

<%= thredded_page do %>
  <section class="thredded--main-section">
    <% if @last_moderated_record %>
      <div class="thredded--moderated-notice">
        <%= render_post_moderation_records([@last_moderated_record]) %>
      </div>
    <% end %>
    <% if @posts.present? %>
      <%= render_posts @posts,
                       partial: 'thredded/moderation/post',
                       content_partial: 'thredded/posts/content' %>
      <%= paginate @posts %>
    <% else %>
      <div class="thredded--empty">
        <h3 class="thredded--empty--title"><%= t 'thredded.moderation.pending.empty.title' %></h3>
        <p><%= t 'thredded.moderation.pending.empty.content' %></p>
      </div>
    <% end %>
  </section>
<% end %>
